import request from "@/utils/request";

// 用户 发送反馈
export function submitFeedBack(feedForm) {
  return request({
    url: '/question/add',
    method: 'post',
    data: feedForm
  })
}

// 管理员 获取所有反馈信息
export function getFeedbackList(queryForm) {
  return request({
    url: '/question/list',
    method: 'post',
    data: queryForm
  })
}

// 反馈详情已读
export function readFeedback(queryForm) {
  return request({
    url: 'question/info',
    params: queryForm
  })
}

// 查询未读消息
export function unraedCount() {
  return request({
    url: '/message/count',
    method: "get"
  })
}

// 管理员回复消息
export function rebackMessage(queryForm) {
  return request({
    url: '/question/backMessage',
    method: 'post',
    data: queryForm
  })
}

// 删除反馈记录
export function removeFeedback(id) {
  return request({
    url: `question/delete/${id}`,
    method: 'delete'
  })
}
